import request from '@/utils/request'

export function getCourseIntro(data) {
  return request({
    url: '/home/courseintro',
    method: 'get',
    params: data
  })
}

export function updateCourseIntro(data) {
  return request({
    url: '/home/courseintro',
    method: 'patch',
    data: data
  })

}

/**
 * 获取功能
 * @param data
 * @returns {*}
 */
export function getFunction(data) {
  return request({
    url: '/home/function',
    method: 'get',
    params: data
  })
}

export function addorupdateFunction(data) {
  return request({
    url: '/home/function',
    method: 'post',
    data: data
  })
}

export function deleteFunction(data) {
  return request({
    url: `/home/function/${data}`,
    method: 'delete'
  })
}
